/**
 * 
 */
package com.xpec.c4.db.model.log;

import java.util.Calendar;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

import com.xpec.c4.db.DBConstant;
import com.xpec.c4.db.model.log.basic.BasicLogModel;
import com.xpec.c4.service.annotations.In;

/**
 * 和玩家相关的Log抽象类，提取了一些必须的项目，包括名称，serverId，等级等信息。
 * 
 * @author Francois
 */
@MappedSuperclass
public class DBAbstractCharacterLog extends BasicLogModel {


	/**
	 * 
	 */
	private static final long serialVersionUID = -2938499177861164281L;

	/**
	 *账户id
	 */
	@Column(columnDefinition = DBConstant.ID_DEFINITION)
	protected String accountId = "";
	
	/**
	 *C4这里值角色的guid
	 */
	@Column(columnDefinition = DBConstant.ID_DEFINITION)
	protected String guid = "";
	
	/**
	 *角色名称
	 */
	protected String name = "";
	
	/**
	 *客服端ip
	 */
	@In
	protected String clientIP = "";
	
	/**
	 *服务器端ID
	 */
	@In(name="moduleID")
	protected String serverId = "";
	
	/**
	 *角色当前的等级
	 */
	protected int roleLevel = -1;

	/**
	 * 所在map的kindid
	 */
	protected String mapKindid;
	
	/**
	 * 所在zone
	 */
	private String zoneID;
	
	/**
	 * x坐标
	 */
	protected float positionX;
	/**
	 * y坐标
	 */
	protected float positionY;
	
	public DBAbstractCharacterLog() {
		super();
	}

	protected DBAbstractCharacterLog(String accountId, String name,
			String clientIP, String serverId, boolean isPay,
			Calendar createTime, int roleLevel, int gamePoint, long onlineTime) {
		super();
		this.accountId = accountId;
		this.name = name;
		this.clientIP = clientIP;
		this.serverId = serverId;
		this.roleLevel = roleLevel;
	}

	public String getAccountId() {
		return accountId;
	}

	public void setAccountId(String accountId) {
		this.accountId = accountId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getClientIP() {
		return clientIP;
	}

	public void setClientIP(String clientIP) {
		this.clientIP = clientIP;
	}

	public String getServerId() {
		return serverId;
	}

	public void setServerId(String serverId) {
		this.serverId = serverId;
	}

	public int getRoleLevel() {
		return roleLevel;
	}

	public void setRoleLevel(int roleLevel) {
		this.roleLevel = roleLevel;
	}

	public String getGuid() {
		return guid;
	}

	public void setGuid(String guid) {
		this.guid = guid;
	}

	@Column(nullable=true)
	public String getMapKindid() {
		return mapKindid;
	}

	public void setMapKindid(String mapKindid) {
		this.mapKindid = mapKindid;
	}

	public float getPositionX() {
		return positionX;
	}

	public void setPositionX(float positionX) {
		this.positionX = positionX;
	}

	public float getPositionY() {
		return positionY;
	}

	public void setPositionY(float positionY) {
		this.positionY = positionY;
	}

	public String getZoneID() {
		return zoneID;
	}

	public void setZoneID(String zoneID) {
		this.zoneID = zoneID;
	}
}
